<%--
  Created by IntelliJ IDEA.
  User: 黑白客
  Date: 2019/6/4
  Time: 19:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        function validateForm() {
            var x = document.forms["transfer"]["in"].value;
            if (x == null || x == "") {
                alert("请输入要转入的银行卡号");
                return false;
            }

            var x = document.forms["transfer"]["money"].value;
            if (x == null || x == "") {
                alert("请输入要转入的金额");
                return false;
            }else if (x <= 0){
                alert("请输入大于零的金额");
                return false;
            }
        }
    </script>
</head>
<body>
    <form action="${pageContext.request.contextPath}/transferServlet" name="transfer" method="post"
          onsubmit="return validateForm()">

        转出账户：<input styp="text" readonly="true" value="${requestScope.id}" name="out" ><br/>
        转入账户：<input styp="text" name="in" oninput="value=value.replace(/[^\d]/g,'')"><br/>
        转账金额：<input type="text" name="money" oninput="value=value.replace(/[^\d]/g,'')" ><br/>
        <input type="submit" value="确认转账">
    </form>
</body>
</html>
